package com.guyaogg.gulimall.auth.feign;

import com.guyaogg.common.utils.R;
import com.guyaogg.gulimall.auth.vo.GiteeSocialUser;
import com.guyaogg.gulimall.auth.vo.UserLoginVO;
import com.guyaogg.gulimall.auth.vo.UserRegisterVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author 顾遥
 */
@FeignClient("gulimall-member")
@RequestMapping("member")
public interface MemberFeignService {

    /**
     * 远程调用注册服务
     * @param vo
     * @return
     */
    @PostMapping("/member/register")
    R register(@RequestBody UserRegisterVO vo);
    @PostMapping("/member/login")
    R login(@RequestBody UserLoginVO vo);

    @PostMapping("/member/oauth2/gitee/login")
    R oauth2GiteeLogin(@RequestBody GiteeSocialUser vo);
}
